package pogvue.datamodel;

import java.util.*;

/** Data structure to hold and manipulate a multiple sequence alignment
 */
public interface AlignmentI {

  public int         getHeight() ;
  public int         getWidth() ;
  public int         getMaxIdLength() ;

  public Vector      getSequences();
  public SequenceI   getSequenceAt(int i);
  public Hashtable getNameHash();
  public void insertSequenceAt(SequenceI seq,int pos);
  public void        addSequence(SequenceI seq) ;
  public void        setSequenceAt(int i,SequenceI seq);

  public void        deleteSequence(SequenceI s) ;
  public void        deleteSequence(int i) ;

  public SequenceI[] getColumns(int start, int end) ;
  public SequenceI[] getColumns(int seq1, int seq2, int start, int end) ;

  public void        deleteColumns(int start, int end) ;
  public void        deleteColumns(int seq1, int seq2, int start, int end) ;

  public void        insertColumns(SequenceI[] seqs, int pos) ;

  public SequenceI   findName(String name) ;
  public int         findIndex(SequenceI s) ;

  // Modifying
  public void        trimLeft(int i) ;
  public void        trimRight(int i) ;

  public void        removeGaps() ;
  public Vector      removeRedundancy(float threshold, Vector sel) ;
  public Sequence[] getSequenceArray();
  public Sequence[] getFilledSequenceArray(int start, int end, int frac);

  // Grouping methods
  public SequenceGroup findGroup(int i) ;
  public SequenceGroup findGroup(SequenceI s) ;
  public void          addToGroup(SequenceGroup g, SequenceI s) ;
  public void          removeFromGroup(SequenceGroup g,SequenceI s) ;
  public void          addGroup(SequenceGroup sg) ;
  public SequenceGroup addGroup() ;
  public void          deleteGroup(SequenceGroup g) ;
  public Vector        getGroups();

  // Sorting
  public void          sortGroups() ;
  public void          sortByPID(SequenceI s) ;
  public void          sortByID() ;

  public void          setGapCharacter(String gc);
  public String        getGapCharacter();

    public Vector        getAAFrequency();

  public void          setSequenceRegion(SequenceRegion r);
  public SequenceRegion getSequenceRegion();
    
}



